package exercise_code;
/*题目：给你两个整数 num1 和 num2，返回这两个整数的和。*/
import java.util.Scanner;

public class Add {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入第一个整数：");
        int num1 = scanner.nextInt();
        System.out.print("请输入第二个整数：");
        int num2 = scanner.nextInt();
        int sum = sum(num1, num2);
        System.out.print("两数之和为：" + sum);
        scanner.close();
    }
    //计算两个整数的和
    public static int sum(int num1, int num2){
        return num1+num2;
    }
}
